Skip to content

GLTFDocument: don't serialize empty buffers#109722

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
nikitalita:fix-gltf-empty-buffers
Jun 23, 2026
Merged

GLTFDocument: don't serialize empty buffers#109722
Repiteo merged 1 commit into
godotengine:masterfrom
nikitalita:fix-gltf-empty-buffers

Conversation

@nikitalita

Copy link
Copy Markdown
Contributor

When serializing to GLTF, we don't want to write buffers if they're empty (it's against spec). This changes the serializing process so that empty buffers are not added to the document or written to disk (unless there are non-empty buffers subsequent to it, which is specifically handled).

@nikitalita nikitalita requested a review from a team as a code owner August 18, 2025 05:15
@AThousandShips AThousandShips added bug enhancement topic:3d cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release labels Aug 18, 2025
@AThousandShips AThousandShips added this to the 4.6 milestone Aug 18, 2025

@aaronfranke aaronfranke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This conflicts with PR #109449, which refactors some of this logic. After PR #109449 is merged and this is rebased, I will be happy to give this a review.

@Repiteo Repiteo modified the milestones: 4.6, 4.x Jan 26, 2026
@Repiteo Repiteo removed the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label May 18, 2026
@aaronfranke

Copy link
Copy Markdown
Member

Actually, PR #109449 is taking too long to be reviewed, and I'd like to move forward with glTF 2.1. I'd like to get this merged in, then work on glTF 2.1 on top of this, then I can rebase PR #109449 on top of that later.

Can you rebase this? The code looks good to me, and I rebased it locally to test it, and it works as expected.

@nikitalita nikitalita force-pushed the fix-gltf-empty-buffers branch from 2075138 to a41f7c5 Compare June 22, 2026 14:16
@nikitalita

Copy link
Copy Markdown
Contributor Author

rebased

@Repiteo Repiteo modified the milestones: 4.x, 4.8 Jun 22, 2026
@Repiteo Repiteo merged commit 8cc54b6 into godotengine:master Jun 23, 2026
20 checks passed
@Repiteo

Repiteo commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants